home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 7.4 KB | 430 lines | [TEXT/MPS ] |
- ;
- ; File: QDOffscreen.a
- ;
- ; Contains: QuickDraw Offscreen GWorld Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
- __QDOFFSCREEN__ SET 1
-
-
- IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
- include 'Errors.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'MixedMode.a' ;
- ; include 'QuickdrawText.a' ;
-
- pixPurgeBit EQU 0
- noNewDeviceBit EQU 1
- useTempMemBit EQU 2
- keepLocalBit EQU 3
- pixelsPurgeableBit EQU 6
- pixelsLockedBit EQU 7
- mapPixBit EQU 16
- newDepthBit EQU 17
- alignPixBit EQU 18
- newRowBytesBit EQU 19
- reallocPixBit EQU 20
- clipPixBit EQU 28
- stretchPixBit EQU 29
- ditherPixBit EQU 30
- gwFlagErrBit EQU 31
-
- pixPurge EQU 1 << pixPurgeBit
- noNewDevice EQU 1 << noNewDeviceBit
- useTempMem EQU 1 << useTempMemBit
- keepLocal EQU 1 << keepLocalBit
- pixelsPurgeable EQU 1 << pixelsPurgeableBit
- pixelsLocked EQU 1 << pixelsLockedBit
- mapPix EQU 1 << mapPixBit
- newDepth EQU 1 << newDepthBit
- alignPix EQU 1 << alignPixBit
- newRowBytes EQU 1 << newRowBytesBit
- reallocPix EQU 1 << reallocPixBit
- clipPix EQU 1 << clipPixBit
- stretchPix EQU 1 << stretchPixBit
- ditherPix EQU 1 << ditherPixBit
- gwFlagErr EQU 1 << gwFlagErrBit
-
- ; typedef unsigned long GWorldFlags
- ; Type definition of a GWorldPtr
- ; typedef CGrafPtr GWorldPtr
- ;
- ; pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld, short PixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NewGWorld
- dc.w $203C
- dc.w $0016
- dc.w $0000
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NewGWorld
- ENDIF
-
- ;
- ; pascal Boolean LockPixels(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _LockPixels
- dc.w $203C
- dc.w $0004
- dc.w $0001
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION LockPixels
- ENDIF
-
- ;
- ; pascal void UnlockPixels(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _UnlockPixels
- dc.w $203C
- dc.w $0004
- dc.w $0002
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION UnlockPixels
- ENDIF
-
- ;
- ; pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld, short pixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _UpdateGWorld
- dc.w $203C
- dc.w $0016
- dc.w $0003
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION UpdateGWorld
- ENDIF
-
- ;
- ; pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _DisposeGWorld
- dc.w $203C
- dc.w $0004
- dc.w $0004
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DisposeGWorld
- ENDIF
-
- ;
- ; pascal void GetGWorld(CGrafPtr *port, GDHandle *gdh)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetGWorld
- dc.w $203C
- dc.w $0008
- dc.w $0005
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetGWorld
- ENDIF
-
- ;
- ; pascal void SetGWorld(CGrafPtr port, GDHandle gdh)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetGWorld
- dc.w $203C
- dc.w $0008
- dc.w $0006
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetGWorld
- ENDIF
-
- ;
- ; pascal void CTabChanged(CTabHandle ctab)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CTabChanged
- dc.w $203C
- dc.w $0004
- dc.w $0007
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CTabChanged
- ENDIF
-
- ;
- ; pascal void PixPatChanged(PixPatHandle ppat)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _PixPatChanged
- dc.w $203C
- dc.w $0004
- dc.w $0008
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PixPatChanged
- ENDIF
-
- ;
- ; pascal void PortChanged(GrafPtr port)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _PortChanged
- dc.w $203C
- dc.w $0004
- dc.w $0009
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PortChanged
- ENDIF
-
- ;
- ; pascal void GDeviceChanged(GDHandle gdh)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GDeviceChanged
- dc.w $203C
- dc.w $0004
- dc.w $000A
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GDeviceChanged
- ENDIF
-
- ;
- ; pascal void AllowPurgePixels(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _AllowPurgePixels
- dc.w $203C
- dc.w $0004
- dc.w $000B
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION AllowPurgePixels
- ENDIF
-
- ;
- ; pascal void NoPurgePixels(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NoPurgePixels
- dc.w $203C
- dc.w $0004
- dc.w $000C
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NoPurgePixels
- ENDIF
-
- ;
- ; pascal GWorldFlags GetPixelsState(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetPixelsState
- dc.w $203C
- dc.w $0004
- dc.w $000D
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetPixelsState
- ENDIF
-
- ;
- ; pascal void SetPixelsState(PixMapHandle pm, GWorldFlags state)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetPixelsState
- dc.w $203C
- dc.w $0008
- dc.w $000E
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetPixelsState
- ENDIF
-
- ;
- ; pascal Ptr GetPixBaseAddr(PixMapHandle pm)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetPixBaseAddr
- dc.w $203C
- dc.w $0004
- dc.w $000F
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetPixBaseAddr
- ENDIF
-
- ;
- ; pascal QDErr NewScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NewScreenBuffer
- dc.w $203C
- dc.w $000E
- dc.w $0010
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NewScreenBuffer
- ENDIF
-
- ;
- ; pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _DisposeScreenBuffer
- dc.w $203C
- dc.w $0004
- dc.w $0011
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION DisposeScreenBuffer
- ENDIF
-
- ;
- ; pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetGWorldDevice
- dc.w $203C
- dc.w $0004
- dc.w $0012
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetGWorldDevice
- ENDIF
-
- ;
- ; pascal Boolean QDDone(GrafPtr port)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _QDDone
- dc.w $203C
- dc.w $0004
- dc.w $0013
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION QDDone
- ENDIF
-
- ;
- ; pascal long OffscreenVersion(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OffscreenVersion
- moveq #20,d0
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OffscreenVersion
- ENDIF
-
- ;
- ; pascal QDErr NewTempScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NewTempScreenBuffer
- dc.w $203C
- dc.w $000E
- dc.w $0015
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NewTempScreenBuffer
- ENDIF
-
- ;
- ; pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _PixMap32Bit
- dc.w $203C
- dc.w $0004
- dc.w $0016
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION PixMap32Bit
- ENDIF
-
- ;
- ; pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetGWorldPixMap
- dc.w $203C
- dc.w $0004
- dc.w $0017
- dc.w $AB1D
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetGWorldPixMap
- ENDIF
-
- ENDIF ; __QDOFFSCREEN__
-